<?php
	if(isset($_POST)){
		include('connect.php');
		$date=date("Y-m-d G:i:s");
		$status=1;
		$sql="INSERT INTO newsletters(title,content,added_date,status)
		VALUES('".$_POST['subject']."','".$_POST['message']."','".$date."','".$status."')";
		if (!mysql_query($sql,$con))
		{
		die('Error: ' . mysql_error());
		}else{
			 header('Location:newsletter.php');
		}
	}
			
?>
